Optimal. Leaf size=80 \[ \frac {(c-i d) x}{4 a^2}+\frac {i c-d}{4 f (a+i a \tan (e+f x))^2}+\frac {i c+d}{4 f \left (a^2+i a^2 \tan (e+f x)\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 80, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {3607, 3560, 8}
\begin {gather*} \frac {d+i c}{4 f \left (a^2+i a^2 \tan (e+f x)\right )}+\frac {x (c-i d)}{4 a^2}+\frac {-d+i c}{4 f (a+i a \tan (e+f x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3560
Rule 3607
Rubi steps
\begin {align*} \int \frac {c+d \tan (e+f x)}{(a+i a \tan (e+f x))^2} \, dx &=\frac {i c-d}{4 f (a+i a \tan (e+f x))^2}+\frac {(c-i d) \int \frac {1}{a+i a \tan (e+f x)} \, dx}{2 a}\\ &=\frac {i c-d}{4 f (a+i a \tan (e+f x))^2}+\frac {i c+d}{4 f \left (a^2+i a^2 \tan (e+f x)\right )}+\frac {(c-i d) \int 1 \, dx}{4 a^2}\\ &=\frac {(c-i d) x}{4 a^2}+\frac {i c-d}{4 f (a+i a \tan (e+f x))^2}+\frac {i c+d}{4 f \left (a^2+i a^2 \tan (e+f x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.58, size = 94, normalized size = 1.18 \begin {gather*} -\frac {\sec ^2(e+f x) (4 i c+(d (-1-4 i f x)+c (i+4 f x)) \cos (2 (e+f x))+(c+i d+4 i c f x+4 d f x) \sin (2 (e+f x)))}{16 a^2 f (-i+\tan (e+f x))^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.20, size = 91, normalized size = 1.14
method | result | size |
risch | \(-\frac {i x d}{4 a^{2}}+\frac {x c}{4 a^{2}}+\frac {i c \,{\mathrm e}^{-2 i \left (f x +e \right )}}{4 a^{2} f}-\frac {{\mathrm e}^{-4 i \left (f x +e \right )} d}{16 f \,a^{2}}+\frac {i {\mathrm e}^{-4 i \left (f x +e \right )} c}{16 f \,a^{2}}\) | \(73\) |
derivativedivides | \(\frac {-\frac {i \left (i d -c \right ) \ln \left (\tan \left (f x +e \right )+i\right )}{8}-\frac {-\frac {c}{4}+\frac {i d}{4}}{\tan \left (f x +e \right )-i}+\left (-\frac {i c}{8}-\frac {d}{8}\right ) \ln \left (\tan \left (f x +e \right )-i\right )-\frac {\frac {i c}{2}-\frac {d}{2}}{2 \left (\tan \left (f x +e \right )-i\right )^{2}}}{f \,a^{2}}\) | \(91\) |
default | \(\frac {-\frac {i \left (i d -c \right ) \ln \left (\tan \left (f x +e \right )+i\right )}{8}-\frac {-\frac {c}{4}+\frac {i d}{4}}{\tan \left (f x +e \right )-i}+\left (-\frac {i c}{8}-\frac {d}{8}\right ) \ln \left (\tan \left (f x +e \right )-i\right )-\frac {\frac {i c}{2}-\frac {d}{2}}{2 \left (\tan \left (f x +e \right )-i\right )^{2}}}{f \,a^{2}}\) | \(91\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: RuntimeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 1.07, size = 57, normalized size = 0.71 \begin {gather*} \frac {{\left (4 \, {\left (c - i \, d\right )} f x e^{\left (4 i \, f x + 4 i \, e\right )} + 4 i \, c e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c - d\right )} e^{\left (-4 i \, f x - 4 i \, e\right )}}{16 \, a^{2} f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.19, size = 162, normalized size = 2.02 \begin {gather*} \begin {cases} \frac {\left (16 i a^{2} c f e^{4 i e} e^{- 2 i f x} + \left (4 i a^{2} c f e^{2 i e} - 4 a^{2} d f e^{2 i e}\right ) e^{- 4 i f x}\right ) e^{- 6 i e}}{64 a^{4} f^{2}} & \text {for}\: a^{4} f^{2} e^{6 i e} \neq 0 \\x \left (- \frac {c - i d}{4 a^{2}} + \frac {\left (c e^{4 i e} + 2 c e^{2 i e} + c - i d e^{4 i e} + i d\right ) e^{- 4 i e}}{4 a^{2}}\right ) & \text {otherwise} \end {cases} + \frac {x \left (c - i d\right )}{4 a^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.54, size = 117, normalized size = 1.46 \begin {gather*} -\frac {\frac {2 \, {\left (-i \, c - d\right )} \log \left (\tan \left (f x + e\right ) + i\right )}{a^{2}} - \frac {2 \, {\left (-i \, c - d\right )} \log \left (\tan \left (f x + e\right ) - i\right )}{a^{2}} - \frac {3 i \, c \tan \left (f x + e\right )^{2} + 3 \, d \tan \left (f x + e\right )^{2} + 10 \, c \tan \left (f x + e\right ) - 10 i \, d \tan \left (f x + e\right ) - 11 i \, c - 3 \, d}{a^{2} {\left (\tan \left (f x + e\right ) - i\right )}^{2}}}{16 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 5.02, size = 70, normalized size = 0.88 \begin {gather*} \frac {\mathrm {tan}\left (e+f\,x\right )\,\left (\frac {d}{4\,a^2}+\frac {c\,1{}\mathrm {i}}{4\,a^2}\right )+\frac {c}{2\,a^2}}{f\,\left ({\mathrm {tan}\left (e+f\,x\right )}^2\,1{}\mathrm {i}+2\,\mathrm {tan}\left (e+f\,x\right )-\mathrm {i}\right )}-\frac {x\,\left (d+c\,1{}\mathrm {i}\right )\,1{}\mathrm {i}}{4\,a^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________